package io.renren.membermanage.controller;

import io.renren.membermanage.dto.UpdateModelLabelParam;
import io.renren.membermanage.service.ModelLabelService;
import io.renren.util.ApiResult;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/modelLabel")
public class ModelLabelController {

    @Resource
    private ModelLabelService modelLabelService;

    @PostMapping("/add")
    public ApiResult<String> addModelLabel(@RequestBody UpdateModelLabelParam param) {
        modelLabelService.addModelLabel(param);
        return ApiResult.success("success");
    }

    @PostMapping("/update")
    public ApiResult<String> updateModelLabel(@RequestBody UpdateModelLabelParam param) {
        modelLabelService.updateModelLabel(param);
        return ApiResult.success("success");
    }

    @DeleteMapping("/delete/{id}")
    public ApiResult<String> addModelLabel(@PathVariable Long id) {
        modelLabelService.deleteModelLabel(id);
        return ApiResult.success("success");
    }
}
